package com.cskaoyan.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 请求参数限定
 * @author stone
 * @date 2022/06/21 11:16
 */
@Controller
@RequestMapping("param")
public class RequestParamLimitController {


    // localhost:8080/param/login?username=songge&password=niupi
    //@RequestMapping(value = "login",params = {"username"}) // 一定要携带username这个请求参数
    @RequestMapping(value = "login",params = {"username","password"}) // 既要携带username又要携带password
    @ResponseBody
    public String login() {
        return "ok";
    }
}
